import request from "@/plugins/request";

var pre = "/property/item";

if (process.env.NODE_ENV !== "development") {
  pre = '/api/sa/empl-care' + pre;
}

export function switchData(obj) {
  let str = '?';
  for (let key in obj) {
    str += `${key}=${obj[key]}&`
  }
  return str.slice(0, -1);
}

// 通过服务类型获取自己的所有服务点下的服务项目
export function getMyPropertyItemForAppPage(data) {
  return request({
    url: `${pre}/getMyPropertyItemForAppPage`,
    method: 'post',
    data: data
  });
}
export function getMyPropertyItemForApp(data) {
  return request({
    url: `${pre}/getMyPropertyItemForApp`,
    method: 'post',
    data: data
  });
}
